package com.bawei.composeui2207a

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.bawei.composeui2207a.day02.Page12
import com.bawei.composeui2207a.day03.Day03_1
import com.bawei.composeui2207a.day03.Day03_2
import com.bawei.composeui2207a.day03.Day03_3_网络数据获取
import com.bawei.composeui2207a.day04.Day04_1导航
import com.bawei.composeui2207a.day04.mvi.good.GoodPage
import com.bawei.composeui2207a.day04.mvi.login.LoginPage
import com.bawei.composeui2207a.ui.theme.ComposeUI2207ATheme

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContent {
            // 设置显示内容的区域
            // Text(text = "Hello 2207A")
          // Demo01()
          //  Page3()
           // Page4()
           // Page5()
            //Page7()
           // Page8()
            //Page9()
            //Page10()
           // Page11()
           // Page12()
           // Day03_1()
            //Day03_2()
            //Day03_3_网络数据获取()
           // Day04_1导航()
           // GoodPage()
            LoginPage()
        }
    }
}

@Composable
fun Greeting(name: String, modifier: Modifier = Modifier) {
    Text(
        text = "Hello $name!",
        modifier = modifier
    )
}

@Preview(showBackground = true)
@Composable
fun GreetingPreview() {
    ComposeUI2207ATheme {
        Greeting("Android")
    }
}